package cn.nawang.ebeim.api.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "tb_storage_strategy", catalog = "ebeim")
public class TbStorageStrategy {
  @Id
  @Column(name = "id", unique = true, nullable = false, length = 45)
  private String id;
  
  @Column(name = "customer_id")
  private String customerId;
  
  @Column(name = "storage_cloud_id")
  private String storageCloudId;
  
  @Column(name = "is_primary")
  private int isPrimary;

  @Transient
  private String customerName;
  
  @Transient
  private String storageCloudName;
  
  public TbStorageStrategy(){
    
  }
  
  public TbStorageStrategy(String id, String customerId, String storageCloudId, int isPrimary,
      String customerName, String storageCloudName) {
    super();
    this.id = id;
    this.customerId = customerId;
    this.storageCloudId = storageCloudId;
    this.isPrimary = isPrimary;
    this.customerName = customerName;
    this.storageCloudName = storageCloudName;
  }

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getCustomerId() {
    return customerId;
  }

  public void setCustomerId(String customerId) {
    this.customerId = customerId;
  }

  public String getStorageCloudId() {
    return storageCloudId;
  }

  public void setStorageCloudId(String storageCloudId) {
    this.storageCloudId = storageCloudId;
  }

  public int getIsPrimary() {
    return isPrimary;
  }

  public void setIsPrimary(int isPrimary) {
    this.isPrimary = isPrimary;
  }

  public String getCustomerName() {
    return customerName;
  }

  public void setCustomerName(String customerName) {
    this.customerName = customerName;
  }

  public String getStorageCloudName() {
    return storageCloudName;
  }

  public void setStorageCloudName(String storageCloudName) {
    this.storageCloudName = storageCloudName;
  }

  @Override
  public String toString() {
    return "TbStorageStrategy [id=" + id + ", customerId=" + customerId + ", storageCloudId="
        + storageCloudId + ", isPrimary=" + isPrimary + ", customerName=" + customerName
        + ", storageCloudName=" + storageCloudName + "]";
  }
}
